package com.shangjinrong.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
    * 标的准备表
    */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "lend")
public class Lend {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 借款用户id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 借款信息id
     */
    @TableField(value = "borrow_info_id")
    private Long borrowInfoId;

    /**
     * 标的编号
     */
    @TableField(value = "lend_no")
    private String lendNo;

    /**
     * 标题
     */
    @TableField(value = "title")
    private String title;

    /**
     * 标的金额
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 投资期数
     */
    @TableField(value = "period")
    private Integer period;

    /**
     * 年化利率
     */
    @TableField(value = "lend_year_rate")
    private BigDecimal lendYearRate;

    /**
     * 平台服务费率
     */
    @TableField(value = "service_rate")
    private BigDecimal serviceRate;

    /**
     * 还款方式
     */
    @TableField(value = "return_method")
    private Byte returnMethod;

    /**
     * 最低投资金额
     */
    @TableField(value = "lowest_amount")
    private BigDecimal lowestAmount;

    /**
     * 已投金额
     */
    @TableField(value = "invest_amount")
    private BigDecimal investAmount;

    /**
     * 投资人数
     */
    @TableField(value = "invest_num")
    private Integer investNum;

    /**
     * 发布日期
     */
    @TableField(value = "publish_date")
    private Date publishDate;

    /**
     * 开始日期
     */
    @TableField(value = "lend_start_date")
    private Date lendStartDate;

    /**
     * 结束日期
     */
    @TableField(value = "lend_end_date")
    private Date lendEndDate;

    /**
     * 说明
     */
    @TableField(value = "lend_info")
    private String lendInfo;

    /**
     * 平台预期收益
     */
    @TableField(value = "expect_amount")
    private BigDecimal expectAmount;

    /**
     * 实际收益
     */
    @TableField(value = "real_amount")
    private BigDecimal realAmount;

    /**
     * 状态
     */
    @TableField(value = "status")
    private Byte status;

    /**
     * 审核时间
     */
    @TableField(value = "check_time")
    private Date checkTime;

    /**
     * 审核用户id
     */
    @TableField(value = "check_admin_id")
    private Long checkAdminId;

    /**
     * 放款时间
     */
    @TableField(value = "payment_time")
    private Date paymentTime;

    /**
     * 放款人id
     */
    @TableField(value = "payment_admin_id")
    private Date paymentAdminId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 逻辑删除(1:已删除，0:未删除)
     */
    @TableField(value = "is_deleted")
    @TableLogic
    private Boolean isDeleted;

    @TableField(exist = false)
    private Map<String, Object> params;

    public static final String COL_ID = "id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_BORROW_INFO_ID = "borrow_info_id";

    public static final String COL_LEND_NO = "lend_no";

    public static final String COL_TITLE = "title";

    public static final String COL_AMOUNT = "amount";

    public static final String COL_PERIOD = "period";

    public static final String COL_LEND_YEAR_RATE = "lend_year_rate";

    public static final String COL_SERVICE_RATE = "service_rate";

    public static final String COL_RETURN_METHOD = "return_method";

    public static final String COL_LOWEST_AMOUNT = "lowest_amount";

    public static final String COL_INVEST_AMOUNT = "invest_amount";

    public static final String COL_INVEST_NUM = "invest_num";

    public static final String COL_PUBLISH_DATE = "publish_date";

    public static final String COL_LEND_START_DATE = "lend_start_date";

    public static final String COL_LEND_END_DATE = "lend_end_date";

    public static final String COL_LEND_INFO = "lend_info";

    public static final String COL_EXPECT_AMOUNT = "expect_amount";

    public static final String COL_REAL_AMOUNT = "real_amount";

    public static final String COL_STATUS = "status";

    public static final String COL_CHECK_TIME = "check_time";

    public static final String COL_CHECK_ADMIN_ID = "check_admin_id";

    public static final String COL_PAYMENT_TIME = "payment_time";

    public static final String COL_PAYMENT_ADMIN_ID = "payment_admin_id";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_IS_DELETED = "is_deleted";
}